﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>安康供电段设备科油卡管理系统</title>
    <style type="text/css">
        .style15 {
            font-size: x-large;
            font-weight: bold;
        }

        .style16 {
            width: 100%;
        }

        .style11 {
            font-size: small;
            text-align: left;
        }

        #table1 {
            width: 900px;
        }

        .style18 {
            height: 90px;
        }

        .style21 {
            font-size: small;
        }

        .style22 {
            height: 120px;
        }

        .style23 {
            color: #808080;
        }

        .style24 {
            font-family: 黑体;
        }
    </style>
    <script>
<!-- 

    top.window.moveTo(0, 0);
    if (document.all) {
        top.window.resizeTo(screen.availWidth, screen.availHeight);
    }
    else if (document.layers || document.getElementById) {
        if (top.window.outerHeight < screen.availHeight || top.window.outerWidth < screen.availWidth) {
            top.window.outerHeight = screen.availHeight;
            top.window.outerWidth = screen.availWidth;
        }
    }

    //--> 
    </script>
</head>
<body background="images/login-bg.jpg">
    <form id="form1" runat="server">
        <div style="text-align: center; font-size: small">
            <br />
            <a name="shuju"></a>
            <span class="style15"><span class="style24">安 康 供 电 段 油 卡 管 理 系 统</span><br
                class="style24" />
                <br />
            </span>
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>

            <asp:Button ID="Button2" runat="server" PostBackUrl="~/Default.aspx?lb=油卡消费" Text="油卡消费" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="Button1" runat="server" PostBackUrl="~/Default.aspx?lb=主卡充值" Text="主卡充值" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="Button3" runat="server" PostBackUrl="~/Default.aspx?lb=基础数据" Text="油卡基础数据" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="Button4" runat="server"
                PostBackUrl="http://10.109.229.100:8080/ranyouxiaohao/" Text="燃油计划提报"
                Font-Bold="True" ForeColor="#0066FF" />
            <br />
            <br />

        </div>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <div style="font-size: small">
                    <asp:SqlDataSource ID="dsAllCard" runat="server"
                        ConnectionString="<%$ ConnectionStrings:xxnewsConnectionString %>"
                        SelectCommand="select * from (select case when balance >500 then 1 else 0 end as a,case when balance> 0 and balance <= 500 then 1 else 0 end as b,case when balance<= 0 then 1 else 0 end as c,* from youkaguanli_card)as t1 where enabled=1 and isshowinmain=1 order by [enabled] DESC,[ordernum], [jgname], [bzname]"></asp:SqlDataSource>
                    <asp:SqlDataSource ID="dsDW" runat="server"
                        ConnectionString="<%$ ConnectionStrings:xxnewsConnectionString %>"
                        SelectCommand="select ch_pwname,ch_pwname+'|'+bm_leibie as chejian FROM siteman WHERE (ch_pwname = '设备科') or (ch_pwname = '材料科') or ch_pwname in(SELECT DISTINCT banzu1 FROM tcjcb) or ch_pwname in(SELECT DISTINCT banzu1 FROM tcjcb_qiche)  or ch_pwname in(SELECT DISTINCT banzu1 FROM tcjcb_fadianji) group by ch_pwname,in_id,ch_px,bm_leibie ORDER BY ch_px"></asp:SqlDataSource>

                    <table id="table7" align="center" border="0" cellpadding="0" cellspacing="0"
                        width="95%">
                        <tr>
                            <td height="10" width="9">
                                <img align="absMiddle" border="0" height="10" src="images/l_1_1.jpg"
                                    width="9" /></td>
                            <td background="images/l_1_8.jpg" width="100%"></td>
                            <td height="10" width="9">
                                <img align="absMiddle" border="0" height="10" src="images/l_1_7.jpg"
                                    width="9" /></td>
                        </tr>
                        <tr>
                            <td background="images/l_1_2.jpg" class="style22"></td>
                            <td align="left" bgcolor="#ffffff" valign="top" width="100%" class="style22">
                                <table id="table8" align="center" border="0" cellpadding="0" cellspacing="0"
                                    width="100%">
                                    <tr>
                                        <td class="style18"><b>&nbsp; 单位:<asp:DropDownList ID="ddlDW0" runat="server" DataSourceID="dsDW" DataTextField="ch_pwname" DataValueField="chejian" AppendDataBoundItems="True">
                                            <asp:ListItem Selected="True" Value="">==请选择==</asp:ListItem>
                                        </asp:DropDownList>
                                            &nbsp;卡号:<asp:TextBox ID="txtCardNum0" runat="server" Width="95px" />
                                            &nbsp; 车号:<asp:TextBox ID="txtCarNum0" runat="server" Width="94px" />
                                            &nbsp; 持卡人:<asp:TextBox ID="txtOwner0" runat="server" Width="73px" />
                                            &nbsp;资金:<asp:CheckBox ID="cbMoney0" runat="server" Text="充足" ForeColor="DarkGreen" /><asp:CheckBox ID="cbMoney1" runat="server" Text="紧张" ForeColor="Chocolate" /><asp:CheckBox ID="cbMoney2" runat="server" Text="欠缺" ForeColor="Red" /></b>
                                            <br />
                                            <br />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>&nbsp;
                                <asp:Label ID="Label_tiaojian" runat="server" Style="color: #FF3300"
                                    Text="Label"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <table id="table9" border="0" cellpadding="0" cellspacing="0" width="100%">
                                                <tr>
                                                    <td background="images/line.jpg" height="1"></td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <table id="table10" border="0" cellpadding="0" cellspacing="0" width="100%">
                                                            <tr>
                                                                <td align="middle" height="35" width="24%">
                                                                    <img align="absMiddle" border="0" height="25" src="images/l_1_10.jpg"
                                                                        width="19" /></td>
                                                                <td align="left" style="text-align: center" width="54%">
                                                                    <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/sub_1.jpg"
                                                                        OnClick="ImageButton1_Click" />
                                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                        <asp:ImageButton ID="ImageButton2" runat="server"
                                                            ImageUrl="~/images/sub_2.jpg" OnClick="ImageButton2_Click" />
                                                                </td>
                                                                <td align="middle" valign="center" width="22%">
                                                                    <img align="absMiddle" border="0" height="15" src="images/l_1_12.jpg"
                                                                        width="49" /></td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td background="images/l_1_6.jpg" class="style22"></td>
                        </tr>
                        <tr>
                            <td height="10" width="9">
                                <img align="absMiddle" border="0" height="10" src="images/l_1_3.jpg"
                                    width="9" /></td>
                            <td background="images/l_1_4.jpg"></td>
                            <td height="10" width="9">
                                <img align="absMiddle" border="0" height="10" src="images/l_1_5.jpg"
                                    width="9" /></td>
                        </tr>
                    </table>

                    <br />

                </div>
                <div style="font-size: small">
                    <table class="style16">
                        <tr>
                            <td style="text-align: center">
                                <b>
                                    <p style="font-size: 22px;">
                                        段主卡：&nbsp;&nbsp;&nbsp; <a href="maincard_detail.aspx?type=0" target="_blank">主卡充值记录</a>&nbsp;&nbsp;&nbsp; <a href="maincard_detail.aspx?type=1" target="_blank">主卡分拨记录</a>&nbsp;&nbsp;&nbsp; 余额：<asp:Label ID="lblMainCardBalance" runat="server">¥0.00</asp:Label>
                                        元<asp:Label ID="lblTip" runat="server" Font-Size="Small" ForeColor="Red">余额不足，请及时为主卡充值！</asp:Label>
                                    </p>
                                    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" Width="90%"
                                        AutoGenerateColumns="False" CellPadding="4" DataKeyNames="id,balance"
                                        EmptyDataText="没有符合条件的油卡"
                                        EnableModelValidation="True" ForeColor="#333333"
                                        Style="text-align: center; font-size: 9pt; font-weight: bold;"
                                        OnDataBound="GridView1_DataBound"
                                        OnPageIndexChanged="GridView1_PageIndexChanged"
                                        OnPageIndexChanging="GridView1_PageIndexChanging"
                                        OnRowDataBound="GridView1_RowDataBound" Font-Bold="False" PageSize="30" DataSourceID="dsAllCard">
                                        <AlternatingRowStyle BackColor="White" />
                                        <Columns>
                                            <asp:BoundField DataField="id" Visible="False" /><asp:TemplateField HeaderText="序号" ItemStyle-ForeColor="Gray"></asp:TemplateField>
                                            <asp:BoundField DataField="jgname" HeaderText="车间" SortExpression="jgname" />
                                            <asp:BoundField DataField="bzname" HeaderText="班组" SortExpression="bzname" />
                                            <asp:BoundField DataField="cardnum" HeaderText="卡号" SortExpression="cardnum" />
                                            <asp:BoundField DataField="carnum" HeaderText="车号" SortExpression="carnum" />
                                            <asp:HyperLinkField DataNavigateUrlFields="cardnum" DataNavigateUrlFormatString="card_detail.aspx?cardnum={0}&amp;type=0" HeaderText="充值记录" Target="_blank" Text="充值记录" />
                                            <asp:HyperLinkField DataNavigateUrlFields="cardnum" DataNavigateUrlFormatString="card_detail.aspx?cardnum={0}&amp;type=1" HeaderText="消费记录" Target="_blank" Text="消费记录" />
                                            <asp:BoundField DataField="balance" HeaderText="当前余额(元)" DataFormatString="{0:C}" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" SortExpression="balance">
                                                <HeaderStyle HorizontalAlign="Right" />
                                                <ItemStyle HorizontalAlign="Right" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="owner" HeaderText="持卡人" SortExpression="owner" />
                                        </Columns>
                                        <EditRowStyle BackColor="#2461BF" />
                                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                        <RowStyle BackColor="#EFF3FB" />
                                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                    </asp:GridView>
                                </b>
                                <br />
                                <asp:Label ID="label_zongjia" runat="server"
                                    Style="color: #FF0000; font-weight: 700" Visible="False"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
    <p class="style21" style="text-align: center">
        &nbsp;<br />
        &nbsp;安康供电段信息中心制作 2015
    </p>
    <p style="text-align: center">
        &nbsp;
    </p>
</body>
</html>
